package com.ruoyi.fina.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 收支记录对象 fin_transaction
 * 
 * @author useragent-1
 * @date 2025-05-26
 */
public class FinTransaction extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 交易ID */
    private Long transactionId;

    /** 用户ID（关联sys_user表） */
    @Excel(name = "用户ID", readConverterExp = "关=联sys_user表")
    private Long userId;

    /** 账户ID（关联fin_account表） */
    @Excel(name = "账户ID", readConverterExp = "关=联fin_account表")
    private Long accountId;

    /** 类别ID（关联fin_category表） */
    @Excel(name = "类别ID", readConverterExp = "关=联fin_category表")
    private Long categoryId;

    /** 金额 */
    @Excel(name = "金额")
    private BigDecimal amount;

    /** 交易类型 */
    @Excel(name = "交易类型")
    private String transactionType;

    /** 交易日期 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "交易日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date transactionDate;

    public void setTransactionId(Long transactionId) 
    {
        this.transactionId = transactionId;
    }

    public Long getTransactionId() 
    {
        return transactionId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setAccountId(Long accountId) 
    {
        this.accountId = accountId;
    }

    public Long getAccountId() 
    {
        return accountId;
    }

    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }

    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }

    public void setTransactionType(String transactionType) 
    {
        this.transactionType = transactionType;
    }

    public String getTransactionType() 
    {
        return transactionType;
    }

    public void setTransactionDate(Date transactionDate) 
    {
        this.transactionDate = transactionDate;
    }

    public Date getTransactionDate() 
    {
        return transactionDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("transactionId", getTransactionId())
            .append("userId", getUserId())
            .append("accountId", getAccountId())
            .append("categoryId", getCategoryId())
            .append("amount", getAmount())
            .append("transactionType", getTransactionType())
            .append("transactionDate", getTransactionDate())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
